package com.steak.elasticsearch.respository;

import com.steak.elasticsearch.entity.Item;
import org.springframework.data.elasticsearch.repository.ElasticsearchCrudRepository;

import java.util.List;
public interface ItemRepository extends ElasticsearchCrudRepository<Item,Long> {

    //自定义方法
    Item findByTitle(String title);

    List<Item> findByPriceBetween(double price1, double price2);

    List<Item> findByTitleLike(String title);

    List<Item> findByBrandLike(String brand);

}
